﻿@model IEnumerable<Film8.Models.Fan>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>


@using (Ajax.BeginForm(
    new AjaxOptions{
    HttpMethod="get",
    InsertionMode=InsertionMode.Replace,
    UpdateTargetId="fanList"}
))
{
    <p>
        Find by name: @Html.TextBox("SearchString")
        Find by address: @Html.TextBox("SearchStringAddress")
        Find by ID: @Html.TextBox("SearchStringID")
        <input type="submit" value="Search" />
    </p>
}

@Html.Partial("_FansTable", Model)